﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Architecture.Repository.Migrations
{
    public partial class _04081 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Corporation",
                columns: table => new
                {
                    CId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CompanyName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Province = table.Column<long>(type: "bigint", nullable: false),
                    City = table.Column<long>(type: "bigint", nullable: false),
                    county = table.Column<long>(type: "bigint", nullable: false),
                    EstablishmentTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CompanyProfile = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    CompanyPicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    HeadOfBreeding = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    BreedingQuantity = table.Column<int>(type: "int", nullable: false),
                    ProductionTeam = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ProductionTeamLeader = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Corporation", x => x.CId);
                });

            migrationBuilder.CreateTable(
                name: "Culture",
                columns: table => new
                {
                    CId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    DynamicVerification = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    Breed = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Source = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    FeedingDays = table.Column<int>(type: "int", nullable: false),
                    Brand = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    PersonIncharge = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    PublicationDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Culture", x => x.CId);
                });

            migrationBuilder.CreateTable(
                name: "DeepProcessing",
                columns: table => new
                {
                    DPId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TeamOrGroup = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    PersonInCharge = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    FoodSafetyInformationPicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DeepProcessing", x => x.DPId);
                });

            migrationBuilder.CreateTable(
                name: "ImmuneInFormation",
                columns: table => new
                {
                    IId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    FeedingDays = table.Column<int>(type: "int", nullable: false),
                    HealthCareMode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HealthCareMethod = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ImmuneInFormation", x => x.IId);
                });

            migrationBuilder.CreateTable(
                name: "Slaughter",
                columns: table => new
                {
                    SId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WeightToFactory = table.Column<decimal>(type: "decimal(10,2)", nullable: false),
                    ArrivalTime = table.Column<decimal>(type: "decimal(10,2)", nullable: false),
                    SlaughterTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    RelevantQualification = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Slaughter", x => x.SId);
                });

            migrationBuilder.CreateTable(
                name: "Supplier",
                columns: table => new
                {
                    SId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionLot = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    RawMaterialPicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    AccessoriesPicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    AdditivePicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    PackagingMaterialPicture = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Supplier", x => x.SId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Corporation");

            migrationBuilder.DropTable(
                name: "Culture");

            migrationBuilder.DropTable(
                name: "DeepProcessing");

            migrationBuilder.DropTable(
                name: "ImmuneInFormation");

            migrationBuilder.DropTable(
                name: "Slaughter");

            migrationBuilder.DropTable(
                name: "Supplier");
        }
    }
}
